﻿@model blacksoft.Models.Personal
@using blacksoft.Helpers

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<div class="block big">
    <div class="titlebar">
        <h3>Modificar Personal</h3>
    </div>
    <div class="block_cont">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()

            <div class="form">
                @Html.ValidationSummary(true)
                @Html.HiddenFor(model => model.IDPersona)
                @Html.HiddenFor(model => model.FechaRegistro)
                @Html.HiddenFor(model => model.TipoPersona)

                <div class="form-group">
                    @Html.LabelForRequired(model => model.DNI)
                    @Html.TextBoxFor(model => model.DNI, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled"})
                    @Html.HiddenFor(model => model.DNI)
                    @Html.ValidationMessageFor(model => model.DNI)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.Nombre)
                    @Html.TextBoxFor(model => model.Nombre, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled" })
                    @Html.HiddenFor(model => model.Nombre)
                    @Html.ValidationMessageFor(model => model.Nombre)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.ApellidoPaterno)
                    @Html.TextBoxFor(model => model.ApellidoPaterno, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled" })
                    @Html.HiddenFor(model => model.ApellidoPaterno)
                    @Html.ValidationMessageFor(model => model.ApellidoPaterno)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.ApellidoMaterno)
                    @Html.TextBoxFor(model => model.ApellidoMaterno, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled" })
                    @Html.HiddenFor(model => model.ApellidoMaterno)
                    @Html.ValidationMessageFor(model => model.ApellidoMaterno)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.FechaNacimiento)
                    @Html.TextBoxFor(model => model.FechaNacimiento, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled" })
                    @Html.HiddenFor(model => model.FechaNacimiento)
                    @Html.ValidationMessageFor(model => model.FechaNacimiento)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.Direccion)
                    @Html.TextBoxFor(model => model.Direccion, new { @class = "text-box single-line", @readonly = "readonly", @disabled = "disabled" })
                    @Html.HiddenFor(model => model.Direccion)
                    @Html.ValidationMessageFor(model => model.Direccion)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.Telefono)
                    @Html.EditorFor(model => model.Telefono)
                    @Html.ValidationMessageFor(model => model.Telefono)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.Celular)
                    @Html.EditorFor(model => model.Celular)
                    @Html.ValidationMessageFor(model => model.Celular)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.Email)
                    @Html.EditorFor(model => model.Email)
                    @Html.ValidationMessageFor(model => model.Email)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.CargoPersonal)
                    @Html.DropDownList("CargoPersonal", null, "Elegir", new { @class = "select" })
                    <!--Html.EditorFor(model => model.CargoPersonal)-->
                    @Html.ValidationMessageFor(model => model.CargoPersonal)
                </div>

                <div class="form-group">
                    @Html.LabelForRequired(model => model.Estado)
                    @Html.DropDownList("Estado", null, "Elegir", new { @class = "select" })
                    @Html.ValidationMessageFor(model => model.Estado)
                </div>

                <div class="form-row">
                    @{
                    if (!ViewBag.Global)
                    {
                        @Html.Hidden("IDTerminal");
                    }
                    else
                    {
                        @Html.LabelForRequired(model => model.IDTerminal)
                                @Html.DropDownList("IDTerminal", null, "Elegir", new { @class = "select" })
                                @Html.ValidationMessageFor(model => model.IDTerminal)
                    }
                    }
                </div>

                @{
                if (ViewBag.Global)
                {
                    <div class="form-row">
                        @Html.LabelForRequired(model => model.IDUnidadVenta)
                        @Html.DropDownList("IDUnidadVenta", null, "Elegir", new { @class = "select" })
                        @Html.ValidationMessageFor(model => model.IDUnidadVenta)
                    </div>
                }
                }
                <br />
                <div class="form-group">
                    <input type="submit" value="Guardar" class="btn btn-default" />
                    <br />
                    @Html.ActionLink("Regresar al listado", "Index")
                </div>
            </div>
        }
    </div>
</div>




